import React from 'react';

import styles from './UserNav.css';
import {Link} from "react-router-dom";

const userPage={
  "index":{
    pathname:"/point-shopping/user",
    state:{
      "bodyName":"index"
    }
  },
  "point":{
    pathname:"/point-shopping/user",
    state:{
      "bodyName":"point"
    }
  },
  "gift":{
    pathname:"/point-shopping/user",
    state:{
      "bodyName":"gift"
    }
  },
  "message":{
    pathname:"/point-shopping/user",
    state:{
      "bodyName":"message"
    }
  },
  "userLoophole":{
    pathname:"/point-shopping/user",
    state:{
      "bodyName":"userLoophole"
    }
  }
};


const UserNav = ({bodyName}) => {


  return (
    <div className={styles.user_sidebar}>
      <div className="sidebar_header">
      </div>
      <ul className={styles.sidebar_nav}>
        <li className={bodyName=='index'?[styles.nav_item,styles["nav_item-active"]].join(' '):styles.nav_item}><Link to={userPage.index}>我的个人中心</Link></li>
        <li className={bodyName=='point'?[styles.nav_item,styles["nav_item-active"]].join(' '):styles.nav_item}><Link to={userPage.point}>我的积分</Link></li>
        {/*<li className={bodyName=='userLoophole'?[styles.nav_item,styles["nav_item-active"]].join(' '):styles.nav_item}><Link to={userPage.userLoophole}>我报告的漏洞</Link></li>*/}
        <li className={bodyName=='gift'?[styles.nav_item,styles["nav_item-active"]].join(' '):styles.nav_item}><Link to={userPage.gift}>我的礼品</Link></li>
        {/*<li className={bodyName=='message'?[styles.nav_item,styles["nav_item-active"]].join(' '):styles.nav_item}><Link to={userPage.message}>消息中心</Link></li>
        <li className={bodyName=='person'?[styles.nav_item,styles["nav_item-active"]].join(' '):styles.nav_item}><Link to="/point-shopping/user">我的个人信息</Link></li>*/}
      </ul>
    </div>
  );
}

export default UserNav
